<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Lemur Gen - 注册</title>

    <link rel="shortcut icon" href="${ctxPath}/static/favicon.ico">
    <link href="${ctxPath}/static/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="${ctxPath}/static/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="${ctxPath}/static/css/plugins/validate/bootstrapValidator.min.css" rel="stylesheet">
    <link href="${ctxPath}/static/css/animate.css" rel="stylesheet">
    <link href="${ctxPath}/static/css/style.css?v=4.1.0" rel="stylesheet">
    <script>if (window.top !== window.self) {
        window.top.location = window.location;
    }</script>
    <script src="${ctxPath}/static/js/jquery.min.js?v=2.1.4"></script>
    <script src="${ctxPath}/static/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="${ctxPath}/static/js/plugins/validate/bootstrapValidator.min.js"></script>
    <script src="${ctxPath}/static/js/plugins/validate/zh_CN.js"></script>
    <script>
        $(function () {
            $('form').bootstrapValidator({
                     fields: {
                         username: {
                             message: '用户名验证失败',
                             validators: {
                                 notEmpty: {
                                     message: '用户名不能为空'
                                 },
                                 regexp: {
                                     regexp: /^[1][3,4,5,8,7][0-9]{9}$/,
                                     message: '手机号格式不对'
                                 }
                             }
                         },
                         password: {
                             validators: {
                                 notEmpty: {
                                     message: '密码不能为空'
                                 },
                                 stringLength: {
                                     /*长度提示*/
                                     min: 6,
                                     max: 20,
                                     message: '密码长度必须在6到20之间'
                                 },
                                 regexp: {
                                     regexp: /^[a-zA-Z0-9]+$/,
                                     message: '密码只能包含大写、小写、数字'
                                 }
                             }
                         }
                     }
                 });
        });
    </script>
</head>

<body class="gray-bg" style="background-image: url('/static/img/login/login.jpg')">

<div class="middle-box text-center loginscreen  animated fadeInDown">
    <div style="padding: 100px 0px;">
        <div>
            <h1 class="logo-name">Gen</h1>
        </div>
        <h3>欢迎注册 Lemur Gen 代码生成器</h3>
        <br/>
        <h4 style="color: red;">${tips!}</h4>
        <form class="m-t" role="form" action="${ctxPath}/register" method="post">
            <div class="form-group">
                <input type="number" name="username" autofocus="autofocus" class="form-control"
                       placeholder="手机号" required="">
            </div>
            <div class="form-group">
                <input type="text" name="password" class="form-control" placeholder="密码 (至少6位)"
                       required="">
            </div>
            <button type="submit" class="btn btn-primary block full-width m-b">注册</button>
            </p>
            <button type="button" class="btn btn-link" style="float: right;"
                    onclick="javascrtpt:window.location.href='/login'">
                <span style="padding: 5px 20px;">登录</span>
            </button>
        </form>
    </div>
</div>
</body>

</html>
